<!-- Modal -->
<div class="modal-dialog wide" style="width: 1000px;">
<div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">
            <#if hrInduction??>
                <#if hrInduction.id??>
                    编辑
                <#else>
                    新增
                </#if>
            </#if>
        </h4>
    </div>
    <div class="modal-body">
        <div id="errorMessage"><#include "../../message.ftl" /></div>
        <form class="form-horizontal" role="form" id="hrInductionForm" method="post" action="${absoluteContextPath}/hr/hrInduction/save">
            <#if hrInduction??>
                <#if hrInduction.id??>
                    <input type="hidden" name="id" value="${hrInduction.id?c}"/>
                <#else>
                    <input type="hidden" name="id" value=""/>
                </#if>
            </#if>
            <div class="row">

                <div class="form-group col-md-4">
                    <label class="col-sm-4 control-label">员工姓名</label>
                    <div class="col-sm-6">
                        <div class="input-group">
                            <input name="employeeName" value="${hrInduction.employeeName!''}" type="text"
                                   class="form-control"
                                   readonly="true"/>
                            <input name="employeeId" id="employeeId2" value="${hrInduction.employeeId!''}"
                                   type="hidden" class="form-control">
                                <span class="input-group-addon" onclick="dorefreshCustome(this);"><i
                                        class="fa fa-search"></i></span>
                        </div>
                    </div>
                </div>

            <div class="form-group col-md-4">
                <label class="col-sm-4 control-label">部门</label>
                <div class="col-sm-6">
                    <input name="department" value="${hrInduction.department!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-4">
                <label class="col-sm-4 control-label">一级经理</label>
                <div class="col-sm-6">
                    <input name="firstManager" value="${hrInduction.firstManager!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-4">
                <label class="col-sm-4 control-label">二级经理</label>
                <div class="col-sm-6">
                    <input name="secondManager" value="${hrInduction.secondManager!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-4">
                <label class="col-sm-4 control-label">三级经理</label>
                <div class="col-sm-6">
                    <input name="threeManager" value="${hrInduction.threeManager!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-4">
                <label class="col-sm-4 control-label">成本中心</label>
                <div class="col-sm-6">
                    <input name="costCenter" value="${hrInduction.costCenter!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-4">
                <label class="col-sm-4 control-label">ZJ</label>
                <div class="col-sm-6">
                    <input name="zj" value="${hrInduction.zj!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-4">
                <label class="col-sm-4 control-label">SY</label>
                <div class="col-sm-6">
                    <input name="sy" value="${hrInduction.sy!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-4">
                <label class="col-sm-4 control-label">JB</label>
                <div class="col-sm-6">
                    <input name="jb" value="${hrInduction.jb!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-4">
                <label class="col-sm-4 control-label">GW</label>
                <div class="col-sm-6">
                    <input name="gw" value="${hrInduction.gw!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-4">
                <label class="col-sm-4 control-label">YJTC</label>
                <div class="col-sm-6">
                    <input name="yjtc" value="${hrInduction.yjtc!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-4">
                <label class="col-sm-4 control-label">YJZH</label>
                <div class="col-sm-6">
                    <input name="yjzh" value="${hrInduction.yjzh!''}" type="text" class="form-control"/>
                </div>
            </div>



            <div class="form-group col-md-4">
                <label class="col-sm-4 control-label">FB</label>
                <div class="col-sm-6">
                    <input name="spareA" value="${hrInduction.spareA!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-4">
                <label class="col-sm-4 control-label">YDBZ</label>
                <div class="col-sm-6">
                    <input name="spareB" value="${hrInduction.spareB!''}" type="text" class="form-control"/>
                </div>
            </div>
            <div class="form-group col-md-4">
                <label class="col-sm-4 control-label">HFBZ</label>
                <div class="col-sm-6">
                    <input name="spareC" value="${hrInduction.spareC!''}" type="text" class="form-control"/>
                </div>
            </div>
                <div class="form-group col-md-4">
                    <label class="col-sm-4 control-label">QTBT</label>
                    <div class="col-sm-6">
                        <input name="spareD" value="${hrInduction.spareD!''}" type="text" class="form-control"/>
                    </div>
                </div>

            </div>
        </form>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
        <button type="button" class="btn btn-primary" onclick="save();">保存</button>
    </div>
</div>
</div>
<script>
    function save() {
        $("#" + "hrInductionForm").ajaxSubmit({
            success:function(data) {
                data = JSON.parse(data);
                if (data.returnCode == 1) {
                    $('#myModal').modal("hide");
                    $.showMessage({parentId:"showMessage",message:"信息保存成功！",type:"success"});
                    refreshTable();
                } else {
                    $.showMessage({parentId:"errorMessage",message:"<strong>错误信息</strong>：" + data.returnMsg,type:"error"});
                }
            }
        });
    }

    $(function () {

        $("input[name=inductionDate]").focus(function () {
            WdatePicker({dateFmt: 'yyyy-MM-dd'});
        })
        $("input[name=positiveDate]").focus(function () {
            WdatePicker({dateFmt: 'yyyy-MM-dd'});
        })

        $("div[class='tooltip fade top in']").hide();
    });
</script>